<div id="main" class="pd14 vany_authority">
    <div class="vany_treeTable pd14">
        <!--面包屑-->
        <div class="pb10" id="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item :to="{ path: '/' }" th:text="#{breadcrumb.systemSetting}"/>
                <el-breadcrumb-item th:text="#{breadcrumb.ruleSetting}"/>
            </el-breadcrumb>
            <i-favorite></i-favorite>
        </div>
        <div>
            <el-form :inline="true">
                <el-form-item>
                    <el-button type="success" icon="el-icon-plus" @click="openDialog" th:text="#{common.add}">add
                    </el-button>
                    <el-button type="success" icon="el-icon-share" @click="exportExcel"
                               th:text="#{common.export}">Export
                    </el-button>
                </el-form-item>
            </el-form>
            <el-table :data="table.tableData" :height="table.tableHeight" id="table" border>
                <el-table-column label="" prop="id">
                    <template scope="scope">
                        <el-button type="text" size="small" @click="editPlant(scope.row)">编辑</el-button>
                        <span style="color:#333;margin:0 0 0 5px">|</span>
                        <el-button type="text" size="small" @click="deletePlant(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
                <el-table-column th:label="#{kpi.rate.table.header.row1.col1}" type="index"
                                 width="100px"></el-table-column>
                <el-table-column th:label="#{kpi.rate.table.header.row1.col2}" prop="rating"></el-table-column>
                <el-table-column th:label="#{kpi.rate.table.header.row1.col3}" prop="score"></el-table-column>
                <el-table-column th:label="#{common.update.user}" prop="updateUser"></el-table-column>
                <el-table-column th:label="#{common.update.date}" prop="updateDate"></el-table-column>
            </el-table>
        </div>
        <el-dialog th:title="标题" :visible.sync="dialog.addVisible">
            <el-form :model="formData" ref="form" label-width="200px">
                <el-form-item th:label="#{kpi.rate}">
                    <el-select v-model="formData.rating" th:placeholder="#{common.hint.select}" size="mini">
                        <el-option v-for="rating in ratingArr" :label="rating.label" :value="rating.value"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item th:label="#{kpi.score}">
                    <el-input-number th:placeholder="#{kpi.input.score}"
                                     controls-position="right"
                                     :min="0" :max="100" size=""
                                     v-model="formData.scoreBefore"></el-input-number>
                    <el-input-number th:placeholder="#{kpi.input.score}"
                                     controls-position="right"
                                     :min="0" :max="100" size="mini"
                                     v-model="formData.scoreAfter"></el-input-number>
                </el-form-item>

            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitForm" th:text="#{common.submit}">确 定</el-button>
                <el-button @click="dialog.addVisible = false" th:text="#{common.cancel}">取 消</el-button>
            </span>
        </el-dialog>
    </div>
</div>
<script type="text/javascript" src="templates/kpi/js/rate.js?ts=new Date().getTime()"></script>